<?php
class DefaultController extends Controller
{
  /**
   * @return array action filters
   */
  public function filters()
  {
    return array(
	  'accessControl', // perform access control for CRUD operations
    );
  }
  /**
  * Specifies the access control rules.
  * This method is used by the 'accessControl' filter.
  * @return array access control rules
  */
  public function accessRules()
  {
    return array(
      array('allow', // allow authenticated user to perform 'create' and 'update' actions
        'actions' => array('index', 'statistic'),
        'users'   => array('@'),
      ),
      array('deny',  // deny all users
        'users' => array('*'),
      ),
    );
  }
  
  public function actionIndex()
  {
    $this->render('index');
  }
  
  public function actionStatistic()
  {
    $this->render('statistic');
  }
}